<script setup lang="ts">
// import { StompClientService } from 'my-stomp-helper/services';
// import { useStompJsStore } from 'my-vue-core/stores';
// import { defineAsyncComponent, onMounted, onUnmounted } from 'vue';
import { defineAsyncComponent } from 'vue';

const MainView = defineAsyncComponent(() => import('@/MainView.vue'));
// const stompJsStore = useStompJsStore();

// onMounted(() => {
//   StompClientService.init({
//     endpoint: 'ws://localhost:8080/hello-websocket/stomp',
//     connectHeaders: {
//       Authorization: 'Bearer token-value-goes-here',
//     },
//     onChangeState: (state) => stompJsStore.changeCurrentState(state),
//     onStompError: (err) => console.error(err),
//     onWebSocketError: (err) => console.error(err),
//   });

//   stompJsStore.changeCurrentState(StompClientService.currentState);
//   StompClientService.connect();
// });

// onUnmounted(() => StompClientService.disconnect());
</script>

<template>
  <MainView />
</template>
